<?
if(isset($var_name) && isset($var_value)){
    if($var_name!="" && $var_value!=""){
	include("include/config.inc");
	include("include/conn_db.inc");
	preg_match("!^(.+?)_(.+?)$!ie",$var_name, $match);
	$table=$match[1];
	$id=$match[2];
    	$sql="UPDATE ".$db_array[$table]." SET var_val= '".$var_value."' WHERE id='".$id."'";
	$result=mysql_query($sql, $conn_db);
	if(mysql_error()){
	    echo "alert('".addslashes(mysql_error())."');";
	}
    }
}
?>